<?php
	require_once($_SERVER['DOCUMENT_ROOT'].'uno-course-scheduler/include/config.inc.php');
	require_once($_SERVER['DOCUMENT_ROOT'].'uno-course-scheduler/include/top.inc.php');

$building_id = mysql_real_escape_string(strip_tags($_GET['bid']));

$get_building_data = mysql_query("SELECT * FROM buildings WHERE id = $building_id");
$building_name = mysql_result($get_building_data,0,'building_name');
$abbreviation = mysql_result($get_building_data,0,'abbreviation');

echo "<p>";
	echo "<a href='timeslots.php?id=$building_id'>&lt;&lt; Back to Timeslots Portal</a><br />";
echo "</p>";
echo "<h1>Add Timeslot in $building_name</h1>";

echo "<p>Please enter time in 24 hour, HH:MM:SS format (i.e. 17:30:00)</p>";

echo "<form action='add_do.php' method='post'>";

//start table
echo "<table border='0'>";
	
	//create table row with column ID's
	echo "<tr>";
		echo "<td width='80' style='text-align: center'><b>Hours/Week</b></td>";
		echo "<td width='80' style='text-align: center'><b>Start Time</b></td>";
		echo "<td width='80' style='text-align: center'><b>End Time</b></td>";
		echo "<td width='80' style='text-align: center'>Monday</td>";
		echo "<td width='80' style='text-align: center'>Tuesday</td>";
		echo "<td width='80' style='text-align: center'>Wednesday</td>";
		echo "<td width='80' style='text-align: center'>Thursday</td>";
		echo "<td width='80' style='text-align: center'>Friday</td>";
		echo "<td width='80' style='text-align: center'>Saturday</td>";
		echo "<td width='80' style='text-align: center'>Sunday</td>";
		echo "<td width='80' style='text-align: center'></td>";
		echo "<td width='80' style='text-align: center'></td>";
	echo "</tr>";
	
	echo "<tr>";
		echo "<td width='80' style='text-align: center'><input type='text' name='hpw'></td>";
		echo "<td width='80' style='text-align: center'><input type='text' name='start'></td>";
		echo "<td width='80' style='text-align: center'><input type='text' name='end'></td>";
		echo "<td style='text-align: center'><input type='checkbox' name='mon' value='1'></td>";
		echo "<td style='text-align: center'><input type='checkbox' name='tues' value='1'></td>";
		echo "<td style='text-align: center'><input type='checkbox' name='weds' value='1'></td>";
		echo "<td style='text-align: center'><input type='checkbox' name='thurs' value='1'></td>";
		echo "<td style='text-align: center'><input type='checkbox' name='fri' value='1'></td>";
		echo "<td style='text-align: center'><input type='checkbox' name='sat' value='1'></td>";
		echo "<td style='text-align: center'><input type='checkbox' name='sun' value='1'></td>";
	echo "</tr>";


//end table tag
echo "</table>";

echo "<input type='hidden' name='bid' value='$building_id'>";
echo "<p><input type='submit'></p>";
echo '</form>';


?>

<?php
	require_once($_SERVER['DOCUMENT_ROOT'].'uno-course-scheduler/include/bottom.inc.php');
?>